Allow any GtkDialog that implements GtkFileChooser as dialog. (#335473,
authorMatthias Clasen <mclasen@redhat.com>
Wed, 20 Dec 2006 19:02:21 +0000 (19:02 +0000)
committerMatthias Clasen <matthiasc@src.gnome.org>
Wed, 20 Dec 2006 19:02:21 +0000 (19:02 +0000)
2006-12-20  Matthias Clasen  <mclasen@redhat.com>

        * gtk/gtkfilechooserbutton.c (gtk_file_chooser_button_new_with_dialog):
        Allow any GtkDialog that implements GtkFileChooser as
        dialog.  (#335473, Tommi Komulainen)

ChangeLog
gtk/gtkfilechooserbutton.c

index c6f8babf49cea4202d4b6505b065cbc7bf1652bf..2d5b57fa94000e8b766bbc8f962d27acca6c26d4 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2006-12-20  Matthias Clasen  <mclasen@redhat.com>
+
+       * gtk/gtkfilechooserbutton.c (gtk_file_chooser_button_new_with_dialog):
+       Allow any GtkDialog that implements GtkFileChooser as
+       dialog.  (#335473, Tommi Komulainen)
+
 2006-12-20  Mikael Hallendal  <micke@imendio.com>
 
        * gtk/gtkstatusicon.c: (gtk_status_icon_init): Fixed a last minute
index fd0cdb4b5c4056a5d78dd14244887e6c22aadcf7..9c66da518aaac9de33431cfe1d28fab30072ba3a 100644 (file)
@@ -354,7 +354,7 @@ gtk_file_chooser_button_class_init (GtkFileChooserButtonClass * class)
                                   g_param_spec_object ("dialog",
                                                        P_("Dialog"),
                                                        P_("The file chooser dialog to use."),
-                                                       GTK_TYPE_FILE_CHOOSER_DIALOG,
+                                                       GTK_TYPE_FILE_CHOOSER,
                                                        (GTK_PARAM_WRITABLE |
                                                         G_PARAM_CONSTRUCT_ONLY)));
 
@@ -2755,11 +2755,12 @@ gtk_file_chooser_button_new_with_backend (const gchar          *title,
 
 /**
  * gtk_file_chooser_button_new_with_dialog:
- * @dialog: the #GtkFileChooserDialog widget to use.
+ * @dialog: the widget to use as dialog
  * 
  * Creates a #GtkFileChooserButton widget which uses @dialog as it's
- * file-picking window. Note that @dialog must be a #GtkFileChooserDialog (or
- * subclass) and must not have %GTK_DIALOG_DESTROY_WITH_PARENT set.
+ * file-picking window. Note that @dialog must be a #GtkDialog (or
+ * subclass) which implements the #GtkFileChooser interface and must 
+ * not have %GTK_DIALOG_DESTROY_WITH_PARENT set.
  * 
  * Returns: a new button widget.
  * 
@@ -2768,7 +2769,7 @@ gtk_file_chooser_button_new_with_backend (const gchar          *title,
 GtkWidget *
 gtk_file_chooser_button_new_with_dialog (GtkWidget *dialog)
 {
-  g_return_val_if_fail (GTK_IS_FILE_CHOOSER_DIALOG (dialog), NULL);
+  g_return_val_if_fail (GTK_IS_FILE_CHOOSER (dialog) && GTK_IS_DIALOG (dialog), NULL);
 
   return g_object_new (GTK_TYPE_FILE_CHOOSER_BUTTON,
                       "dialog", dialog,